package com.ihg.hiex.entity.session.task;

import com.demo2do.core.utils.Alias;

/**
 * 
 * @author downpour
 */
@Alias("SessionTaskStatus")
public enum Status {
    
    NOT_START("not_start", "尚未完成", "Incomplete", "not-start", "assessor.515"),
    
    ON_GOING("ongoing", "进行中", "On going", "on-going", "assessor.515"),
    
    PROCESSING("processing", "进行中", "Processing", "processing", "assessor.515"),
    
    FINISH("finish", "已完成", "Completed", "finish", "assessor.516");

    private String alias;
    
    private String description;
    
    private String display;
    
    private String css;
    
    private String message;

    /**
     * @param alias
     * @param description
     */
    private Status(String alias, String description, String display, String css, String message) {
        this.alias = alias;
        this.description = description;
        this.display = display;
        this.css = css;
        this.message = message;
    }
    
    /**
     * 
     * @param alias
     * @return
     */
    public static Status aliasOf(String alias) {
        
        for(Status status : Status.values()) {
            if(status.getAlias().equals(alias)) {
                
                return status;
            }
        }
        return null;
    }
    
    /**
     * 
     * @return
     */
    public boolean isFinish() {
        return this.equals(FINISH);
    }
    
    /**
     * 
     * @return
     */
    public boolean isNotStart() {
        return this.equals(NOT_START);
    }
    
    /**
     * 
     * @return  alias
     */
    public String getAlias() {
        return alias;
    }
    
    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }
    
    /**
     * @return
     */
    public String getDisplay() {
        return display;
    }
    
    /**
     * @return
     */
    public String getCss() {
        return css;
    }
    
    /**
     * 
     * @return
     */
    public String getMessage() {
        return message;
    }
    
}
